Principal Type Schemes for Modular Programs

نویسندگان

  • Derek Dreyer
  • Matthias Blume
چکیده

Two of the most prominent features of ML are its expressive module system and its support for Damas-Milner type inference. However, while the foundations of both these features have been studied extensively, their interaction has never received a proper type-theoretic treatment. One consequence is that both the official Definition and the alternative Harper-Stone semantics of Standard ML are difficult to implement correctly. To bolster this claim, we offer a series of short example programs on which no existing SML typechecker follows the behavior prescribed by either formal definition. It is unclear how to amend the implementations to match the definitions or vice versa. Instead, we propose a way of defining how type inference interacts with modules that is more liberal than any existing definition or implementation of SML and, moreover, admits a provably sound and complete typechecking algorithm via a straightforward generalization of Algorithm W. In addition to being conceptually simple, our solution exhibits a novel hybrid of the Definition and Harper-Stone semantics of SML, and demonstrates the broader relevance of some type-theoretic techniques developed recently in the study of recursive modules.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fixed Point Results for Cyclic (α,β)-Admissible Type F-Contractions‎ ‎in Modular Spaces

In this paper, we prove the existence and uniqueness of fixed points for cyclic (α,β)-admissible type F-contraction and F−weak contraction under the setting of modular spaces, where the modular is convex and satisfying the ∆2-condition. Later, we prove some periodic point results for self-mappings on a modular space. We also give some examples to s...

متن کامل

Fixed point theorems for new J-type mappings in modular spaces

In this paper, we introduce $rho$-altering $J$-type mappings in modular spaces. We prove some fixed point theorems for $rho$-altering and $rho$-altering $J$-type mappings in modular spaces. We also furnish illustrative examples to express relationship between these mappings. As a consequence, the results are applied to the existence of solution of an integral equation arising from an ODE ...

متن کامل

$C$-class functions on common fixed point theorems for weak‎ ‎contraction mapping of integral type in modular spaces

‎In this paper‎, ‎we use the concept of $C$-class functions introduced‎ ‎by Ansari [4] to prove the existence and uniqueness of‎ ‎common fixed point for self-mappings in modular spaces of integral‎ ‎inequality‎. ‎Our results extended and generalized previous known‎ ‎results in this direction‎.

متن کامل

Type Inference for Record Concatenation and Multiple Inheritance

We show that the type inference problem for a lambda calculus with records, including a record concatenation operator, is decidable. We show that this calculus does not have principal types, but does have nite complete sets of types: that is, for any termM in the calculus, there exists an e ectively generable nite set of type schemes such that every typing for M is an instance of one the scheme...

متن کامل

New Shewhart-type synthetic bar{X} control schemes for non-normal data

In this paper, Burr-type XII ̄X synthetic schemes are proposed as an alternative to the classical ̄X synthetic schemes when the assumption of normality fails to hold. First, the basic design of the Burr-type XII ̄X synthetic scheme is developed and its performance investigated using exact formulae. Secondly, the non-side-sensitive and side-sensitive Burr-type XII ̄X synthetic schemes are int...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007